<script>
import { ref } from "vue";
export default {
  name: "HomeView",
  setup() {
    let count = ref(1);
    let addCount = () => {
      count.value++;
    };

    return {
      count: count,
      addCount,
    };
  },
};
</script>

<template>
  <main>
    <h2>
      这是主页面
    </h2>
    <p>{{ count }}</p>
    <p><button @click="addCount">点击</button></p>
  </main>
</template>

<style scoped></style>   